<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>css代码段 - vzvixb</title>
  <meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="even" /><meta name="description" content="CSS书写顺序
 位置属性(position, top, right, z-index, display, float等) 大小(width, height, padding, margin) 文字系列(font, line-height, letter-spacing, color- text-align等) 背景(background, border等) 其他(animation, transition, cursor等) " /><meta name="keywords" content="Hugo, theme, even" />






<meta name="generator" content="Hugo 0.90.1 with theme even" />


<link rel="canonical" href="https://zhouxiaoxin.gitee.io/post/htmlcss/css%E4%BB%A3%E7%A0%81%E6%AE%B5/" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">

<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

<link href="/sass/main.min.32d4dc642fec98c34c80bebb9c784c50771712b4a8a25d9f4dd9cce3534b426e.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">


<meta property="og:title" content="css代码段" />
<meta property="og:description" content="CSS书写顺序

位置属性(position, top, right, z-index, display, float等)
大小(width, height, padding, margin)
文字系列(font, line-height, letter-spacing, color- text-align等)
背景(background, border等)
其他(animation, transition, cursor等)
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://zhouxiaoxin.gitee.io/post/htmlcss/css%E4%BB%A3%E7%A0%81%E6%AE%B5/" /><meta property="article:section" content="post" />
<meta property="article:published_time" content="2018-02-05T00:00:00+00:00" />
<meta property="article:modified_time" content="2018-02-05T00:00:00+00:00" />

<meta itemprop="name" content="css代码段">
<meta itemprop="description" content="CSS书写顺序

位置属性(position, top, right, z-index, display, float等)
大小(width, height, padding, margin)
文字系列(font, line-height, letter-spacing, color- text-align等)
背景(background, border等)
其他(animation, transition, cursor等)
"><meta itemprop="datePublished" content="2018-02-05T00:00:00+00:00" />
<meta itemprop="dateModified" content="2018-02-05T00:00:00+00:00" />
<meta itemprop="wordCount" content="3424">
<meta itemprop="keywords" content="CSS," /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="css代码段"/>
<meta name="twitter:description" content="CSS书写顺序

位置属性(position, top, right, z-index, display, float等)
大小(width, height, padding, margin)
文字系列(font, line-height, letter-spacing, color- text-align等)
背景(background, border等)
其他(animation, transition, cursor等)
"/>

<!--[if lte IE 9]>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->

<!--[if lt IE 9]>
  <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<![endif]-->

</head>
<body>
  <div id="mobile-navbar" class="mobile-navbar">
  <div class="mobile-header-logo">
    <a href="/" class="logo">Even</a>
  </div>
  <div class="mobile-navbar-icon">
    <span></span>
    <span></span>
    <span></span>
  </div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
  <ul class="mobile-menu-list">
    <a href="/">
        <li class="mobile-menu-item">Home</li>
      </a><a href="/post/">
        <li class="mobile-menu-item">Archs</li>
      </a><a href="/tags/">
        <li class="mobile-menu-item">Tags</li>
      </a><a href="/categories/">
        <li class="mobile-menu-item">Cates</li>
      </a><a href="/about/">
        <li class="mobile-menu-item">About</li>
      </a><a href="/pages/runoob/">
        <li class="mobile-menu-item">runoob</li>
      </a><a href="/pages/98wubi/">
        <li class="mobile-menu-item">98wubi</li>
      </a>
  </ul>
</nav>
  <div class="container" id="mobile-panel">
    <header id="header" class="header">
        <div class="logo-wrapper">
  <a href="/" class="logo">Even</a>
</div>

<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
        <a class="menu-item-link" href="/">Home</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/post/">Archs</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/tags/">Tags</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/categories/">Cates</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/about/">About</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/pages/runoob/">runoob</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/pages/98wubi/">98wubi</a>
      </li>
  </ul>
</nav>
    </header>

    <main id="main" class="main">
      <div class="content-wrapper">
        <div id="content" class="content">
          <article class="post">
    
    <header class="post-header">
      <h1 class="post-title">css代码段</h1>

      <div class="post-meta">
        <span class="post-time"> 2018-02-05 </span>
        <div class="post-category">
            <a href="/categories/css/"> CSS </a>
            </div>
          <span class="more-meta"> 约 3424 字 </span>
          <span class="more-meta"> 预计阅读 7 分钟 </span>
        <span id="busuanzi_container_page_pv" class="more-meta"> <span id="busuanzi_value_page_pv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 次阅读 </span>
      </div>
    </header>

    
    <div class="post-content">
      <p>CSS书写顺序</p>
<ol>
<li>位置属性(position, top, right, z-index, display, float等)</li>
<li>大小(width, height, padding, margin)</li>
<li>文字系列(font, line-height, letter-spacing, color- text-align等)</li>
<li>背景(background, border等)</li>
<li>其他(animation, transition, cursor等)</li>
</ol>
<h2 id="常用css代码段">常用css代码段</h2>
<h3 id="强制英文换行">强制英文换行</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">.</span><span class="nc">text</span> <span class="p">{</span>
  <span class="k">word-wrap</span><span class="p">:</span> <span class="kc">break-word</span><span class="p">;</span> 
  <span class="k">word-break</span><span class="p">:</span> <span class="kc">normal</span><span class="p">;</span>
<span class="p">}</span>

</code></pre></td></tr></table>
</div>
</div><h3 id="超过指定行数后显示省略号">超过指定行数后显示省略号</h3>
<p>一行显示</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">.</span><span class="nc">box</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span>
  <span class="k">width</span><span class="p">:</span><span class="mi">200</span><span class="kt">px</span><span class="p">;</span><span class="c">/*对宽度的定义,根据情况修改*/</span>
  <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
  <span class="k">white-space</span><span class="p">:</span> <span class="kc">nowrap</span><span class="p">;</span>
  <span class="k">text-overflow</span><span class="p">:</span> <span class="kc">ellipsis</span><span class="p">;</span> 
<span class="p">}</span>

</code></pre></td></tr></table>
</div>
</div><p>多行显示</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">.</span><span class="nc">box</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kp">-webkit-</span><span class="n">box</span><span class="p">;</span>
  <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
  <span class="k">width</span><span class="p">:</span><span class="mi">200</span><span class="kt">px</span><span class="p">;</span>
  <span class="k">text-overflow</span><span class="p">:</span> <span class="kc">ellipsis</span><span class="p">;</span>
  <span class="k">word-wrap</span><span class="p">:</span> <span class="kc">break-word</span><span class="p">;</span>
  <span class="k">word-break</span><span class="p">:</span> <span class="n">break-all</span><span class="p">;</span>
  <span class="k">white-space</span><span class="p">:</span> <span class="kc">normal</span> <span class="cp">!important</span><span class="p">;</span>
  <span class="kp">-webkit-</span><span class="n">line-clamp</span><span class="p">:</span> <span class="mi">3</span><span class="p">;</span>
  <span class="kp">-webkit-</span><span class="n">box-orient</span><span class="p">:</span> <span class="kc">vertical</span><span class="p">;</span>
<span class="p">}</span>

</code></pre></td></tr></table>
</div>
</div><h3 id="继承box-sizing">继承box-sizing</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">html</span> <span class="p">{</span>
  <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span>
<span class="p">}</span>
 
<span class="o">,</span> <span class="p">:</span><span class="nd">before</span><span class="o">,</span> <span class="o">*</span><span class="p">:</span><span class="nd">after</span> <span class="p">{</span>
  <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">inherit</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="清除浮动">清除浮动</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="c">/*
</span><span class="c">.clearFix:after {
</span><span class="c">    content: &#34;.&#34;;
</span><span class="c">    display: block;
</span><span class="c">    height: 0;
</span><span class="c">    clear: both;
</span><span class="c">    visibility: hidden;
</span><span class="c">}
</span><span class="c">*/</span>
<span class="p">.</span><span class="nc">clearfix</span><span class="p">:</span><span class="nd">before</span><span class="o">,</span> 
<span class="p">.</span><span class="nc">clearfix</span><span class="p">:</span><span class="nd">after</span><span class="p">{</span> 
    <span class="k">display</span><span class="p">:</span> <span class="kc">table</span><span class="p">;</span> 
    <span class="k">content</span><span class="p">:</span> <span class="s2">&#34; &#34;</span><span class="p">;</span> 
<span class="p">}</span>
<span class="p">.</span><span class="nc">clearfix</span><span class="p">:</span><span class="nd">after</span><span class="p">{</span>
    <span class="k">clear</span><span class="p">:</span> <span class="kc">both</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="flex-两端对齐问题">flex 两端对齐问题</h3>
<p>flex给我们的布局带来了很大的方便 ，但有时候也会碰到一些问题，比如space-between最后一行元素的排列问题</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">ul</span><span class="p">:</span><span class="nd">after</span><span class="p">{</span>
    <span class="k">content</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">;</span>
    <span class="k">width</span><span class="p">:</span> <span class="mi">90</span><span class="kt">px</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="两端对齐">两端对齐</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">.</span><span class="nc">box</span> <span class="p">{</span>
    <span class="k">display</span><span class="p">:</span><span class="kc">block</span><span class="p">;</span>
    <span class="k">text-align</span><span class="p">:</span><span class="kc">justify</span><span class="p">;</span>
    <span class="k">text-align-last</span><span class="p">:</span><span class="kc">justify</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">box</span><span class="p">:</span><span class="nd">after</span> <span class="p">{</span>
    <span class="k">content</span><span class="p">:</span> <span class="s1">&#39;&#39;</span><span class="p">;</span>
    <span class="k">display</span><span class="p">:</span><span class="kc">inline-block</span><span class="p">;</span>
    <span class="k">width</span><span class="p">:</span><span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="跨浏览器的透明度">跨浏览器的透明度</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">.</span><span class="nc">transparent</span> <span class="p">{</span>
    <span class="k">filter</span><span class="p">:</span> <span class="nf">alpha</span><span class="p">(</span><span class="n">opacity</span><span class="err">=</span><span class="mi">50</span><span class="p">);</span> <span class="c">/* internet explorer */</span>
    <span class="kp">-khtml-</span><span class="k">opacity</span><span class="p">:</span> <span class="mf">0.5</span><span class="p">;</span>      <span class="c">/* khtml, old safari */</span>
    <span class="kp">-moz-</span><span class="k">opacity</span><span class="p">:</span> <span class="mf">0.5</span><span class="p">;</span>       <span class="c">/* mozilla, netscape */</span>
    <span class="k">opacity</span><span class="p">:</span> <span class="mf">0.5</span><span class="p">;</span>           <span class="c">/* fx, safari, opera */</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="不定宽高元素水平垂直居中">不定宽高元素水平垂直居中</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">position</span><span class="o">:</span> <span class="nt">absolute</span><span class="o">;</span>  
<span class="nt">left</span><span class="o">:</span> <span class="nt">50</span><span class="o">%;</span>  
<span class="nt">top</span><span class="o">:</span> <span class="nt">50</span><span class="o">%;</span>  
<span class="nt">-webkit-transform</span><span class="o">:</span> <span class="nt">translate</span><span class="o">(</span><span class="nt">-50</span><span class="o">%,</span><span class="nt">-50</span><span class="o">%);</span>  
<span class="nt">transform</span><span class="o">:</span> <span class="nt">translate</span><span class="o">(</span><span class="nt">-50</span><span class="o">%,</span><span class="nt">-50</span><span class="o">%);</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="自定义文本选择">自定义文本选择</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">::</span><span class="nd">selection</span> <span class="p">{</span> <span class="k">background</span><span class="p">:</span> <span class="mh">#e2eae2</span><span class="p">;</span> <span class="p">}</span>
<span class="p">::</span><span class="nd">-moz-selection</span> <span class="p">{</span> <span class="k">background</span><span class="p">:</span> <span class="mh">#e2eae2</span><span class="p">;</span> <span class="p">}</span>
<span class="p">::</span><span class="nd">-webkit-selection</span> <span class="p">{</span> <span class="k">background</span><span class="p">:</span> <span class="mh">#e2eae2</span><span class="p">;</span> <span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="背景图片全屏铺满">背景图片全屏铺满</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">html</span> <span class="p">{</span> 
    <span class="k">background</span><span class="p">:</span> <span class="nb">url</span><span class="p">(</span><span class="s1">&#39;images/bg.jpg&#39;</span><span class="p">)</span> <span class="kc">no-repeat</span> <span class="kc">center</span> <span class="kc">center</span> <span class="kc">fixed</span><span class="p">;</span> 
    <span class="kp">-webkit-</span><span class="k">background-size</span><span class="p">:</span> <span class="kc">cover</span><span class="p">;</span>
    <span class="kp">-moz-</span><span class="k">background-size</span><span class="p">:</span> <span class="kc">cover</span><span class="p">;</span>
    <span class="kp">-o-</span><span class="k">background-size</span><span class="p">:</span> <span class="kc">cover</span><span class="p">;</span>
    <span class="k">background-size</span><span class="p">:</span> <span class="kc">cover</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="自定义字体">自定义字体</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">@</span><span class="k">font-face</span> <span class="p">{</span>
    <span class="nt">font-family</span><span class="o">:</span> <span class="s1">&#39;MyWebFont&#39;</span><span class="o">;</span>
    <span class="nt">src</span><span class="o">:</span> <span class="nt">url</span><span class="o">(</span><span class="s1">&#39;webfont.eot&#39;</span><span class="o">);</span> <span class="c">/* IE9 Compat Modes */</span>
    <span class="nt">src</span><span class="o">:</span> <span class="nt">url</span><span class="o">(</span><span class="s1">&#39;webfont.eot?#iefix&#39;</span><span class="o">)</span> <span class="nt">format</span><span class="o">(</span><span class="s1">&#39;embedded-opentype&#39;</span><span class="o">),</span> <span class="c">/* IE6-IE8 */</span>
    <span class="nt">url</span><span class="o">(</span><span class="s1">&#39;webfont.woff&#39;</span><span class="o">)</span> <span class="nt">format</span><span class="o">(</span><span class="s1">&#39;woff&#39;</span><span class="o">),</span> <span class="c">/* Modern Browsers */</span>
    <span class="nt">url</span><span class="o">(</span><span class="s1">&#39;webfont.ttf&#39;</span><span class="o">)</span>  <span class="nt">format</span><span class="o">(</span><span class="s1">&#39;truetype&#39;</span><span class="o">),</span> <span class="c">/* Safari, Android, iOS */</span>
    <span class="nt">url</span><span class="o">(</span><span class="s1">&#39;webfont.svg#svgFontName&#39;</span><span class="o">)</span> <span class="nt">format</span><span class="o">(</span><span class="s1">&#39;svg&#39;</span><span class="o">);</span> <span class="c">/* Legacy iOS */</span>
<span class="p">}</span>
        
<span class="nt">body</span> <span class="p">{</span>
    <span class="k">font-family</span><span class="p">:</span> <span class="s1">&#39;MyWebFont&#39;</span><span class="p">,</span> <span class="n">Arial</span><span class="p">,</span> <span class="kc">sans-serif</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="定义彩红字体">定义彩红字体</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="o">&lt;</span><span class="nt">p</span><span class="o">&gt;</span><span class="nt">think</span><span class="o">&lt;/</span><span class="nt">p</span><span class="o">&gt;</span>
<span class="nt">p</span> <span class="p">{</span>
    <span class="k">font-size</span><span class="p">:</span> <span class="mi">20</span><span class="kt">vw</span><span class="p">;</span>
    <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">color</span><span class="p">:</span> <span class="kc">white</span><span class="p">;</span>
    <span class="k">font-family</span><span class="p">:</span> <span class="kc">sans-serif</span><span class="p">;</span>
    <span class="k">font-weight</span><span class="p">:</span> <span class="kc">bold</span><span class="p">;</span>
    <span class="k">text-transform</span><span class="p">:</span> <span class="kc">uppercase</span><span class="p">;</span>
    <span class="k">background-image</span><span class="p">:</span> <span class="nb">linear-gradient</span><span class="p">(</span>
        <span class="kc">to</span> <span class="kc">right</span><span class="p">,</span>
        <span class="kc">orangered</span><span class="p">,</span>
        <span class="kc">orange</span><span class="p">,</span>
        <span class="kc">gold</span><span class="p">,</span>
        <span class="kc">lightgreen</span><span class="p">,</span>
        <span class="kc">cyan</span><span class="p">,</span>
        <span class="kc">dodgerblue</span><span class="p">,</span>
        <span class="kc">mediumpurple</span><span class="p">,</span>
        <span class="kc">hotpink</span><span class="p">,</span>
        <span class="kc">orangered</span><span class="p">);</span>
    <span class="k">background-size</span><span class="p">:</span> <span class="mi">110</span><span class="kt">vw</span><span class="p">;</span>
    <span class="k">animation</span><span class="p">:</span> <span class="n">sliding</span> <span class="mi">30</span><span class="kt">s</span> <span class="kc">linear</span> <span class="kc">infinite</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="k">background-clip</span><span class="p">:</span> <span class="kc">text</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="n">text-fill-color</span><span class="p">:</span> <span class="kc">transparent</span><span class="p">;</span>
<span class="p">}</span>

<span class="p">@</span><span class="k">keyframes</span> <span class="nt">sliding</span> <span class="p">{</span>
    <span class="nt">to</span> <span class="p">{</span>
        <span class="k">background-position</span><span class="p">:</span> <span class="mi">-2000</span><span class="kt">vw</span><span class="p">;</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="段落首字母样式">段落首字母样式</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">p</span><span class="p">:</span><span class="nd">first-letter</span><span class="p">{</span>
    <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span>
    <span class="k">margin</span><span class="p">:</span> <span class="mi">5</span><span class="kt">px</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">5</span><span class="kt">px</span><span class="p">;</span>
    <span class="k">float</span><span class="p">:</span> <span class="kc">left</span><span class="p">;</span>
    <span class="k">color</span><span class="p">:</span> <span class="mh">#ff3366</span><span class="p">;</span>
    <span class="k">font-size</span><span class="p">:</span> <span class="mf">5.4</span><span class="kt">em</span><span class="p">;</span>
    <span class="k">font-family</span><span class="p">:</span> <span class="n">Georgia</span><span class="p">,</span> <span class="n">Times</span> <span class="n">New</span> <span class="n">Roman</span><span class="p">,</span> <span class="kc">serif</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="css3阴影">css3阴影</h3>
<ol>
<li>盒子内部阴影</li>
</ol>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">#</span><span class="nn">mydiv</span> <span class="p">{</span> 
    <span class="kp">-moz-</span><span class="k">box-shadow</span><span class="p">:</span> <span class="kc">inset</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">0</span> <span class="mi">4</span><span class="kt">px</span> <span class="mh">#000</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="k">box-shadow</span><span class="p">:</span> <span class="kc">inset</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">0</span> <span class="mi">4</span><span class="kt">px</span> <span class="mh">#000</span><span class="p">;</span>
    <span class="k">box-shadow</span><span class="p">:</span> <span class="kc">inset</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">0</span> <span class="mi">4</span><span class="kt">px</span> <span class="mh">#000</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><ol start="2">
<li>盒子外部阴影</li>
</ol>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">#</span><span class="nn">mydiv</span> <span class="p">{</span> 
    <span class="kp">-webkit-</span><span class="k">box-shadow</span><span class="p">:</span> <span class="mi">0</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">-2</span><span class="kt">px</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mf">0.52</span><span class="p">);</span>
    <span class="kp">-moz-</span><span class="k">box-shadow</span><span class="p">:</span> <span class="mi">0</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">-2</span><span class="kt">px</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mf">0.52</span><span class="p">);</span>
    <span class="k">box-shadow</span><span class="p">:</span> <span class="mi">0</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">2</span><span class="kt">px</span> <span class="mi">-2</span><span class="kt">px</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mf">0.52</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><p>与CSS3内阴影一样,我也提供一段外阴影的代码. 注意第三个数字表示模糊距离,第四个表示范围。</p>
<h3 id="li列表前面插入">li列表前面'▶'插入</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">ul</span> <span class="p">{</span>
    <span class="k">margin</span><span class="p">:</span> <span class="mf">0.75</span><span class="kt">em</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span> <span class="mi">1</span><span class="kt">em</span><span class="p">;</span>
    <span class="k">list-style</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
<span class="p">}</span>
<span class="nt">li</span><span class="p">:</span><span class="nd">before</span> <span class="p">{</span> 
    <span class="k">content</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">;</span>
    <span class="k">border-color</span><span class="p">:</span> <span class="kc">transparent</span> <span class="mh">#111</span><span class="p">;</span>
    <span class="k">border-style</span><span class="p">:</span> <span class="kc">solid</span><span class="p">;</span>
    <span class="k">border-width</span><span class="p">:</span> <span class="mf">0.35</span><span class="kt">em</span> <span class="mi">0</span> <span class="mf">0.35</span><span class="kt">em</span> <span class="mf">0.45</span><span class="kt">em</span><span class="p">;</span>
    <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span>
    <span class="k">height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">width</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">left</span><span class="p">:</span> <span class="mi">-1</span><span class="kt">em</span><span class="p">;</span>
    <span class="k">top</span><span class="p">:</span> <span class="mf">0.9</span><span class="kt">em</span><span class="p">;</span>
    <span class="k">position</span><span class="p">:</span> <span class="kc">relative</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="强制代码包装">强制代码包装</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">pre</span> <span class="p">{</span>
    <span class="k">white-space</span><span class="p">:</span> <span class="kc">pre-wrap</span><span class="p">;</span>       <span class="c">/* css-3 */</span>
    <span class="k">white-space</span><span class="p">:</span> <span class="kp">-moz-</span><span class="kc">pre-wrap</span><span class="p">;</span>  <span class="c">/* Mozilla, since 1999 */</span>
    <span class="k">white-space</span><span class="p">:</span> <span class="o">-</span><span class="kc">pre-wrap</span><span class="p">;</span>      <span class="c">/* Opera 4-6 */</span>
    <span class="k">white-space</span><span class="p">:</span> <span class="kp">-o-</span><span class="kc">pre-wrap</span><span class="p">;</span>    <span class="c">/* Opera 7 */</span>
    <span class="k">word-wrap</span><span class="p">:</span> <span class="kc">break-word</span><span class="p">;</span>       <span class="c">/* Internet Explorer 5.5+ */</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><p>典型的pre标签是在布局中用来显示大块代码的。</p>
<h3 id="css3发光输入框">css3发光输入框</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">text</span><span class="o">],</span> <span class="nt">textarea</span> <span class="p">{</span>
    <span class="kp">-webkit-</span><span class="k">transition</span><span class="p">:</span> <span class="kc">all</span> <span class="mf">0.30</span><span class="kt">s</span> <span class="kc">ease-in-out</span><span class="p">;</span>
    <span class="kp">-moz-</span><span class="k">transition</span><span class="p">:</span> <span class="kc">all</span> <span class="mf">0.30</span><span class="kt">s</span> <span class="kc">ease-in-out</span><span class="p">;</span>
    <span class="kp">-ms-</span><span class="k">transition</span><span class="p">:</span> <span class="kc">all</span> <span class="mf">0.30</span><span class="kt">s</span> <span class="kc">ease-in-out</span><span class="p">;</span>
    <span class="kp">-o-</span><span class="k">transition</span><span class="p">:</span> <span class="kc">all</span> <span class="mf">0.30</span><span class="kt">s</span> <span class="kc">ease-in-out</span><span class="p">;</span>
    <span class="k">outline</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
    <span class="k">padding</span><span class="p">:</span> <span class="mi">3</span><span class="kt">px</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">3</span><span class="kt">px</span> <span class="mi">3</span><span class="kt">px</span><span class="p">;</span>
    <span class="k">margin</span><span class="p">:</span> <span class="mi">5</span><span class="kt">px</span> <span class="mi">1</span><span class="kt">px</span> <span class="mi">3</span><span class="kt">px</span> <span class="mi">0</span><span class="kt">px</span><span class="p">;</span>
    <span class="k">border</span><span class="p">:</span> <span class="mi">1</span><span class="kt">px</span> <span class="kc">solid</span> <span class="mh">#ddd</span><span class="p">;</span>
<span class="p">}</span>
 
<span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">text</span><span class="o">]</span><span class="p">:</span><span class="nd">focus</span><span class="o">,</span> <span class="nt">textarea</span><span class="p">:</span><span class="nd">focus</span> <span class="p">{</span>
    <span class="k">box-shadow</span><span class="p">:</span> <span class="mi">0</span> <span class="mi">0</span> <span class="mi">5</span><span class="kt">px</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">81</span><span class="p">,</span> <span class="mi">203</span><span class="p">,</span> <span class="mi">238</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
    <span class="k">padding</span><span class="p">:</span> <span class="mi">3</span><span class="kt">px</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">3</span><span class="kt">px</span> <span class="mi">3</span><span class="kt">px</span><span class="p">;</span>
    <span class="k">margin</span><span class="p">:</span> <span class="mi">5</span><span class="kt">px</span> <span class="mi">1</span><span class="kt">px</span> <span class="mi">3</span><span class="kt">px</span> <span class="mi">0</span><span class="kt">px</span><span class="p">;</span>
    <span class="k">border</span><span class="p">:</span> <span class="mi">1</span><span class="kt">px</span> <span class="kc">solid</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">81</span><span class="p">,</span> <span class="mi">203</span><span class="p">,</span> <span class="mi">238</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="网页两端阴影">网页两端阴影</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">body</span><span class="p">:</span><span class="nd">before</span> <span class="p">{</span>
    <span class="k">content</span><span class="p">:</span> <span class="s2">&#34;&#34;</span><span class="p">;</span>
    <span class="k">position</span><span class="p">:</span> <span class="kc">fixed</span><span class="p">;</span>
    <span class="k">top</span><span class="p">:</span> <span class="mi">-10</span><span class="kt">px</span><span class="p">;</span>
    <span class="k">left</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">width</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
    <span class="k">height</span><span class="p">:</span> <span class="mi">10</span><span class="kt">px</span><span class="p">;</span>

    <span class="kp">-webkit-</span><span class="k">box-shadow</span><span class="p">:</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">10</span><span class="kt">px</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mf">.8</span><span class="p">);</span>
    <span class="kp">-moz-</span><span class="k">box-shadow</span><span class="p">:</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">10</span><span class="kt">px</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mf">.8</span><span class="p">);</span>
    <span class="k">box-shadow</span><span class="p">:</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">0</span><span class="kt">px</span> <span class="mi">10</span><span class="kt">px</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mf">.8</span><span class="p">);</span>
    <span class="k">z-index</span><span class="p">:</span> <span class="mi">100</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="css背景噪音">css背景噪音</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">body</span> <span class="p">{</span>
      <span class="k">background-image</span><span class="p">:</span> <span class="nb">url</span><span class="p">(</span><span class="sx"></span><span class="p">);</span>
  <span class="k">background-color</span><span class="p">:</span> <span class="kc">tan</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="按钮渐变动画">按钮渐变动画</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span><span class="lnt">9
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">button</span> <span class="p">{</span>
    <span class="k">background-image</span><span class="p">:</span> <span class="nb">linear-gradient</span><span class="p">(</span><span class="mh">#5187c4</span><span class="p">,</span> <span class="mh">#1c2f45</span><span class="p">);</span>
    <span class="k">background-size</span><span class="p">:</span> <span class="kc">auto</span> <span class="mi">200</span><span class="kt">%</span><span class="p">;</span>
    <span class="k">background-position</span><span class="p">:</span> <span class="mi">0</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
    <span class="k">transition</span><span class="p">:</span> <span class="k">background-position</span> <span class="mf">0.5</span><span class="kt">s</span><span class="p">;</span>
<span class="p">}</span>    
<span class="nt">button</span><span class="p">:</span><span class="nd">hover</span> <span class="p">{</span>
    <span class="k">background-position</span><span class="p">:</span> <span class="mi">0</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="css3实现load省略号显示">css3实现load省略号显示</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="p">.</span><span class="nc">loading</span><span class="p">:</span><span class="nd">after</span> <span class="p">{</span>
    <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
    <span class="k">display</span><span class="p">:</span> <span class="kc">inline-block</span><span class="p">;</span>
    <span class="k">vertical-align</span><span class="p">:</span> <span class="kc">bottom</span><span class="p">;</span>
    <span class="k">animation</span><span class="p">:</span> <span class="kc">ellipsis</span> <span class="mi">2</span><span class="kt">s</span> <span class="kc">infinite</span><span class="p">;</span>
    <span class="k">content</span><span class="p">:</span> <span class="s2">&#34;\2026&#34;</span><span class="p">;</span> <span class="c">/* ascii code for the ellipsis character */</span>
<span class="p">}</span>
<span class="p">@</span><span class="k">keyframes</span> <span class="nt">ellipsis</span> <span class="p">{</span>
    <span class="nt">from</span> <span class="p">{</span>
        <span class="k">width</span><span class="p">:</span> <span class="mi">2</span><span class="kt">px</span><span class="p">;</span>
    <span class="p">}</span>
    <span class="nt">to</span> <span class="p">{</span>
        <span class="k">width</span><span class="p">:</span> <span class="mi">15</span><span class="kt">px</span><span class="p">;</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h2 id="媒体查询">媒体查询</h2>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span><span class="lnt">39
</span><span class="lnt">40
</span><span class="lnt">41
</span><span class="lnt">42
</span><span class="lnt">43
</span><span class="lnt">44
</span><span class="lnt">45
</span><span class="lnt">46
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="nt">7</span><span class="p">.</span><span class="nc">一般媒体查询</span>
<span class="c">/* Smartphones (portrait and landscape) ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> 
<span class="nt">and</span> <span class="o">(</span><span class="nt">min-device-width</span> <span class="o">:</span> <span class="nt">320px</span><span class="o">)</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">max-device-width</span> <span class="o">:</span> <span class="nt">480px</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>

<span class="c">/* Smartphones (landscape) ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">min-width</span> <span class="o">:</span> <span class="nt">321px</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>

<span class="c">/* Smartphones (portrait) ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">max-width</span> <span class="o">:</span> <span class="nt">320px</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>

<span class="c">/* iPads (portrait and landscape) ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">min-device-width</span> <span class="o">:</span> <span class="nt">768px</span><span class="o">)</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">max-device-width</span> <span class="o">:</span> <span class="nt">1024px</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>

<span class="c">/* iPads (landscape) ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">min-device-width</span> <span class="o">:</span> <span class="nt">768px</span><span class="o">)</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">max-device-width</span> <span class="o">:</span> <span class="nt">1024px</span><span class="o">)</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">orientation</span> <span class="o">:</span> <span class="nt">landscape</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>

<span class="c">/* iPads (portrait) ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">min-device-width</span> <span class="o">:</span> <span class="nt">768px</span><span class="o">)</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">max-device-width</span> <span class="o">:</span> <span class="nt">1024px</span><span class="o">)</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">orientation</span> <span class="o">:</span> <span class="nt">portrait</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>

<span class="c">/* Desktops and laptops ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">min-width</span> <span class="o">:</span> <span class="nt">1224px</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>

<span class="c">/* Large screens ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">min-width</span> <span class="o">:</span> <span class="nt">1824px</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>

<span class="c">/* iPhone 4 ----------- */</span>
<span class="p">@</span><span class="k">media</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">-webkit-min-device-pixel-ratio</span><span class="p">:</span><span class="nd">1</span><span class="p">.</span><span class="nc">5</span><span class="o">),</span> <span class="nt">only</span> <span class="nt">screen</span> <span class="nt">and</span> <span class="o">(</span><span class="nt">min-device-pixel-ratio</span><span class="p">:</span><span class="nd">1</span><span class="p">.</span><span class="nc">5</span><span class="o">)</span> <span class="p">{</span>
  <span class="c">/* Styles */</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><h2 id="css样式重置">css样式重置</h2>
<h3 id="pc-css重置">PC-CSS重置</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">  1
</span><span class="lnt">  2
</span><span class="lnt">  3
</span><span class="lnt">  4
</span><span class="lnt">  5
</span><span class="lnt">  6
</span><span class="lnt">  7
</span><span class="lnt">  8
</span><span class="lnt">  9
</span><span class="lnt"> 10
</span><span class="lnt"> 11
</span><span class="lnt"> 12
</span><span class="lnt"> 13
</span><span class="lnt"> 14
</span><span class="lnt"> 15
</span><span class="lnt"> 16
</span><span class="lnt"> 17
</span><span class="lnt"> 18
</span><span class="lnt"> 19
</span><span class="lnt"> 20
</span><span class="lnt"> 21
</span><span class="lnt"> 22
</span><span class="lnt"> 23
</span><span class="lnt"> 24
</span><span class="lnt"> 25
</span><span class="lnt"> 26
</span><span class="lnt"> 27
</span><span class="lnt"> 28
</span><span class="lnt"> 29
</span><span class="lnt"> 30
</span><span class="lnt"> 31
</span><span class="lnt"> 32
</span><span class="lnt"> 33
</span><span class="lnt"> 34
</span><span class="lnt"> 35
</span><span class="lnt"> 36
</span><span class="lnt"> 37
</span><span class="lnt"> 38
</span><span class="lnt"> 39
</span><span class="lnt"> 40
</span><span class="lnt"> 41
</span><span class="lnt"> 42
</span><span class="lnt"> 43
</span><span class="lnt"> 44
</span><span class="lnt"> 45
</span><span class="lnt"> 46
</span><span class="lnt"> 47
</span><span class="lnt"> 48
</span><span class="lnt"> 49
</span><span class="lnt"> 50
</span><span class="lnt"> 51
</span><span class="lnt"> 52
</span><span class="lnt"> 53
</span><span class="lnt"> 54
</span><span class="lnt"> 55
</span><span class="lnt"> 56
</span><span class="lnt"> 57
</span><span class="lnt"> 58
</span><span class="lnt"> 59
</span><span class="lnt"> 60
</span><span class="lnt"> 61
</span><span class="lnt"> 62
</span><span class="lnt"> 63
</span><span class="lnt"> 64
</span><span class="lnt"> 65
</span><span class="lnt"> 66
</span><span class="lnt"> 67
</span><span class="lnt"> 68
</span><span class="lnt"> 69
</span><span class="lnt"> 70
</span><span class="lnt"> 71
</span><span class="lnt"> 72
</span><span class="lnt"> 73
</span><span class="lnt"> 74
</span><span class="lnt"> 75
</span><span class="lnt"> 76
</span><span class="lnt"> 77
</span><span class="lnt"> 78
</span><span class="lnt"> 79
</span><span class="lnt"> 80
</span><span class="lnt"> 81
</span><span class="lnt"> 82
</span><span class="lnt"> 83
</span><span class="lnt"> 84
</span><span class="lnt"> 85
</span><span class="lnt"> 86
</span><span class="lnt"> 87
</span><span class="lnt"> 88
</span><span class="lnt"> 89
</span><span class="lnt"> 90
</span><span class="lnt"> 91
</span><span class="lnt"> 92
</span><span class="lnt"> 93
</span><span class="lnt"> 94
</span><span class="lnt"> 95
</span><span class="lnt"> 96
</span><span class="lnt"> 97
</span><span class="lnt"> 98
</span><span class="lnt"> 99
</span><span class="lnt">100
</span><span class="lnt">101
</span><span class="lnt">102
</span><span class="lnt">103
</span><span class="lnt">104
</span><span class="lnt">105
</span><span class="lnt">106
</span><span class="lnt">107
</span><span class="lnt">108
</span><span class="lnt">109
</span><span class="lnt">110
</span><span class="lnt">111
</span><span class="lnt">112
</span><span class="lnt">113
</span><span class="lnt">114
</span><span class="lnt">115
</span><span class="lnt">116
</span><span class="lnt">117
</span><span class="lnt">118
</span><span class="lnt">119
</span><span class="lnt">120
</span><span class="lnt">121
</span><span class="lnt">122
</span><span class="lnt">123
</span><span class="lnt">124
</span><span class="lnt">125
</span><span class="lnt">126
</span><span class="lnt">127
</span><span class="lnt">128
</span><span class="lnt">129
</span><span class="lnt">130
</span><span class="lnt">131
</span><span class="lnt">132
</span><span class="lnt">133
</span><span class="lnt">134
</span><span class="lnt">135
</span><span class="lnt">136
</span><span class="lnt">137
</span><span class="lnt">138
</span><span class="lnt">139
</span><span class="lnt">140
</span><span class="lnt">141
</span><span class="lnt">142
</span><span class="lnt">143
</span><span class="lnt">144
</span><span class="lnt">145
</span><span class="lnt">146
</span><span class="lnt">147
</span><span class="lnt">148
</span><span class="lnt">149
</span><span class="lnt">150
</span><span class="lnt">151
</span><span class="lnt">152
</span><span class="lnt">153
</span><span class="lnt">154
</span><span class="lnt">155
</span><span class="lnt">156
</span><span class="lnt">157
</span><span class="lnt">158
</span><span class="lnt">159
</span><span class="lnt">160
</span><span class="lnt">161
</span><span class="lnt">162
</span><span class="lnt">163
</span><span class="lnt">164
</span><span class="lnt">165
</span><span class="lnt">166
</span><span class="lnt">167
</span><span class="lnt">168
</span><span class="lnt">169
</span><span class="lnt">170
</span><span class="lnt">171
</span><span class="lnt">172
</span><span class="lnt">173
</span><span class="lnt">174
</span><span class="lnt">175
</span><span class="lnt">176
</span><span class="lnt">177
</span><span class="lnt">178
</span><span class="lnt">179
</span><span class="lnt">180
</span><span class="lnt">181
</span><span class="lnt">182
</span><span class="lnt">183
</span><span class="lnt">184
</span><span class="lnt">185
</span><span class="lnt">186
</span><span class="lnt">187
</span><span class="lnt">188
</span><span class="lnt">189
</span><span class="lnt">190
</span><span class="lnt">191
</span><span class="lnt">192
</span><span class="lnt">193
</span><span class="lnt">194
</span><span class="lnt">195
</span><span class="lnt">196
</span><span class="lnt">197
</span><span class="lnt">198
</span><span class="lnt">199
</span><span class="lnt">200
</span><span class="lnt">201
</span><span class="lnt">202
</span><span class="lnt">203
</span><span class="lnt">204
</span><span class="lnt">205
</span><span class="lnt">206
</span><span class="lnt">207
</span><span class="lnt">208
</span><span class="lnt">209
</span><span class="lnt">210
</span><span class="lnt">211
</span><span class="lnt">212
</span><span class="lnt">213
</span><span class="lnt">214
</span><span class="lnt">215
</span><span class="lnt">216
</span><span class="lnt">217
</span><span class="lnt">218
</span><span class="lnt">219
</span><span class="lnt">220
</span><span class="lnt">221
</span><span class="lnt">222
</span><span class="lnt">223
</span><span class="lnt">224
</span><span class="lnt">225
</span><span class="lnt">226
</span><span class="lnt">227
</span><span class="lnt">228
</span><span class="lnt">229
</span><span class="lnt">230
</span><span class="lnt">231
</span><span class="lnt">232
</span><span class="lnt">233
</span><span class="lnt">234
</span><span class="lnt">235
</span><span class="lnt">236
</span><span class="lnt">237
</span><span class="lnt">238
</span><span class="lnt">239
</span><span class="lnt">240
</span><span class="lnt">241
</span><span class="lnt">242
</span><span class="lnt">243
</span><span class="lnt">244
</span><span class="lnt">245
</span><span class="lnt">246
</span><span class="lnt">247
</span><span class="lnt">248
</span><span class="lnt">249
</span><span class="lnt">250
</span><span class="lnt">251
</span><span class="lnt">252
</span><span class="lnt">253
</span><span class="lnt">254
</span><span class="lnt">255
</span><span class="lnt">256
</span><span class="lnt">257
</span><span class="lnt">258
</span><span class="lnt">259
</span><span class="lnt">260
</span><span class="lnt">261
</span><span class="lnt">262
</span><span class="lnt">263
</span><span class="lnt">264
</span><span class="lnt">265
</span><span class="lnt">266
</span><span class="lnt">267
</span><span class="lnt">268
</span><span class="lnt">269
</span><span class="lnt">270
</span><span class="lnt">271
</span><span class="lnt">272
</span><span class="lnt">273
</span><span class="lnt">274
</span><span class="lnt">275
</span><span class="lnt">276
</span><span class="lnt">277
</span><span class="lnt">278
</span><span class="lnt">279
</span><span class="lnt">280
</span><span class="lnt">281
</span><span class="lnt">282
</span><span class="lnt">283
</span><span class="lnt">284
</span><span class="lnt">285
</span><span class="lnt">286
</span><span class="lnt">287
</span><span class="lnt">288
</span><span class="lnt">289
</span><span class="lnt">290
</span><span class="lnt">291
</span><span class="lnt">292
</span><span class="lnt">293
</span><span class="lnt">294
</span><span class="lnt">295
</span><span class="lnt">296
</span><span class="lnt">297
</span><span class="lnt">298
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="c">/* normalize.css */</span>

<span class="nt">html</span> <span class="p">{</span>
  <span class="k">line-height</span><span class="p">:</span> <span class="mf">1.5</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="kp">-ms-</span><span class="n">text-size-adjust</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
  <span class="kp">-webkit-</span><span class="n">text-size-adjust</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">body</span> <span class="p">{</span>
  <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">article</span><span class="o">,</span>
<span class="nt">aside</span><span class="o">,</span>
<span class="nt">footer</span><span class="o">,</span>
<span class="nt">header</span><span class="o">,</span>
<span class="nt">nav</span><span class="o">,</span>
<span class="nt">section</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">h1</span> <span class="p">{</span>
  <span class="k">font-size</span><span class="p">:</span> <span class="mi">2</span><span class="kt">em</span><span class="p">;</span>
  <span class="k">margin</span><span class="p">:</span> <span class="mf">0.67</span><span class="kt">em</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">figcaption</span><span class="o">,</span>
<span class="nt">figure</span><span class="o">,</span>
<span class="nt">main</span> <span class="p">{</span>
  <span class="c">/* 1 */</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">figure</span> <span class="p">{</span>
  <span class="k">margin</span><span class="p">:</span> <span class="mi">1</span><span class="kt">em</span> <span class="mi">40</span><span class="kt">px</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">hr</span> <span class="p">{</span>
  <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">content-box</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">overflow</span><span class="p">:</span> <span class="kc">visible</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">pre</span> <span class="p">{</span>
  <span class="k">font-family</span><span class="p">:</span> <span class="kc">monospace</span><span class="p">,</span> <span class="kc">monospace</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">font-size</span><span class="p">:</span> <span class="mi">1</span><span class="kt">em</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">a</span> <span class="p">{</span>
  <span class="k">background-color</span><span class="p">:</span> <span class="kc">transparent</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="kp">-webkit-</span><span class="k">text-decoration-skip</span><span class="p">:</span> <span class="kc">objects</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">abbr</span><span class="o">[</span><span class="nt">title</span><span class="o">]</span> <span class="p">{</span>
  <span class="k">border-bottom</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">text-decoration</span><span class="p">:</span> <span class="kc">underline</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
  <span class="k">text-decoration</span><span class="p">:</span> <span class="kc">underline</span> <span class="kc">dotted</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">b</span><span class="o">,</span>
<span class="nt">strong</span> <span class="p">{</span>
  <span class="k">font-weight</span><span class="p">:</span> <span class="kc">inherit</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">b</span><span class="o">,</span>
<span class="nt">strong</span> <span class="p">{</span>
  <span class="k">font-weight</span><span class="p">:</span> <span class="kc">bolder</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">code</span><span class="o">,</span>
<span class="nt">kbd</span><span class="o">,</span>
<span class="nt">samp</span> <span class="p">{</span>
  <span class="k">font-family</span><span class="p">:</span> <span class="kc">monospace</span><span class="p">,</span> <span class="kc">monospace</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">font-size</span><span class="p">:</span> <span class="mi">1</span><span class="kt">em</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">dfn</span> <span class="p">{</span>
  <span class="k">font-style</span><span class="p">:</span> <span class="kc">italic</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">mark</span> <span class="p">{</span>
  <span class="k">background-color</span><span class="p">:</span> <span class="mh">#ff0</span><span class="p">;</span>
  <span class="k">color</span><span class="p">:</span> <span class="mh">#000</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">small</span> <span class="p">{</span>
  <span class="k">font-size</span><span class="p">:</span> <span class="mi">80</span><span class="kt">%</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">sub</span><span class="o">,</span>
<span class="nt">sup</span> <span class="p">{</span>
  <span class="k">font-size</span><span class="p">:</span> <span class="mi">75</span><span class="kt">%</span><span class="p">;</span>
  <span class="k">line-height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
  <span class="k">position</span><span class="p">:</span> <span class="kc">relative</span><span class="p">;</span>
  <span class="k">vertical-align</span><span class="p">:</span> <span class="kc">baseline</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">sub</span> <span class="p">{</span>
  <span class="k">bottom</span><span class="p">:</span> <span class="mf">-0.25</span><span class="kt">em</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">sup</span> <span class="p">{</span>
  <span class="k">top</span><span class="p">:</span> <span class="mf">-0.5</span><span class="kt">em</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">audio</span><span class="o">,</span>
<span class="nt">video</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">inline-block</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">audio</span><span class="p">:</span><span class="nd">not</span><span class="o">([</span><span class="nt">controls</span><span class="o">])</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
  <span class="k">height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">img</span> <span class="p">{</span>
  <span class="k">border-style</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">svg</span><span class="p">:</span><span class="nd">not</span><span class="o">(</span><span class="p">:</span><span class="nd">root</span><span class="o">)</span> <span class="p">{</span>
  <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">button</span><span class="o">,</span>
<span class="nt">input</span><span class="o">,</span>
<span class="nt">optgroup</span><span class="o">,</span>
<span class="nt">select</span><span class="o">,</span>
<span class="nt">textarea</span> <span class="p">{</span>
  <span class="k">font-family</span><span class="p">:</span> <span class="kc">sans-serif</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">font-size</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">line-height</span><span class="p">:</span> <span class="mf">1.15</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">button</span><span class="o">,</span>
<span class="nt">input</span> <span class="p">{</span>
  <span class="c">/* 1 */</span>
  <span class="k">overflow</span><span class="p">:</span> <span class="kc">visible</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">button</span><span class="o">,</span>
<span class="nt">select</span> <span class="p">{</span>
  <span class="c">/* 1 */</span>
  <span class="k">text-transform</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">button</span><span class="o">,</span>
<span class="nt">html</span> <span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;button&#34;</span><span class="o">],</span>

<span class="c">/* 1 */</span>

<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;reset&#34;</span><span class="o">],</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;submit&#34;</span><span class="o">]</span> <span class="p">{</span>
  <span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span> <span class="n">button</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">button</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;button&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;reset&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;submit&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-moz-focus-inner</span> <span class="p">{</span>
  <span class="k">border-style</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
  <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">button</span><span class="p">:</span><span class="nd">-moz-focusring</span><span class="o">,</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;button&#34;</span><span class="o">]</span><span class="p">:</span><span class="nd">-moz-focusring</span><span class="o">,</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;reset&#34;</span><span class="o">]</span><span class="p">:</span><span class="nd">-moz-focusring</span><span class="o">,</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;submit&#34;</span><span class="o">]</span><span class="p">:</span><span class="nd">-moz-focusring</span> <span class="p">{</span>
  <span class="k">outline</span><span class="p">:</span> <span class="mi">1</span><span class="kt">px</span> <span class="kc">dotted</span> <span class="n">ButtonText</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">fieldset</span> <span class="p">{</span>
  <span class="k">padding</span><span class="p">:</span> <span class="mf">0.35</span><span class="kt">em</span> <span class="mf">0.75</span><span class="kt">em</span> <span class="mf">0.625</span><span class="kt">em</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">legend</span> <span class="p">{</span>
  <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">color</span><span class="p">:</span> <span class="kc">inherit</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">table</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">max-width</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
  <span class="c">/* 3 */</span>
  <span class="k">white-space</span><span class="p">:</span> <span class="kc">normal</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
<span class="p">}</span>

<span class="nt">progress</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">inline-block</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">vertical-align</span><span class="p">:</span> <span class="kc">baseline</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">textarea</span> <span class="p">{</span>
  <span class="k">overflow</span><span class="p">:</span> <span class="kc">auto</span><span class="p">;</span>
<span class="p">}</span>

<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;checkbox&#34;</span><span class="o">],</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;radio&#34;</span><span class="o">]</span> <span class="p">{</span>
  <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;number&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-webkit-inner-spin-button</span><span class="o">,</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;number&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-webkit-outer-spin-button</span> <span class="p">{</span>
  <span class="k">height</span><span class="p">:</span> <span class="kc">auto</span><span class="p">;</span>
<span class="p">}</span>

<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;search&#34;</span><span class="o">]</span> <span class="p">{</span>
  <span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span> <span class="n">textfield</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">outline-offset</span><span class="p">:</span> <span class="mi">-2</span><span class="kt">px</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;search&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-webkit-search-cancel-button</span><span class="o">,</span>
<span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;search&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-webkit-search-decoration</span> <span class="p">{</span>
  <span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
<span class="p">}</span>

 <span class="p">::</span><span class="nd">-webkit-file-upload-button</span> <span class="p">{</span>
  <span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span> <span class="n">button</span><span class="p">;</span>
  <span class="c">/* 1 */</span>
  <span class="k">font</span><span class="p">:</span> <span class="kc">inherit</span><span class="p">;</span>
  <span class="c">/* 2 */</span>
<span class="p">}</span>

<span class="nt">details</span><span class="o">,</span>

<span class="c">/* 1 */</span>

<span class="nt">menu</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">summary</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">list-item</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">canvas</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">inline-block</span><span class="p">;</span>
<span class="p">}</span>

<span class="nt">template</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
<span class="p">}</span>

<span class="o">[</span><span class="nt">hidden</span><span class="o">]</span> <span class="p">{</span>
  <span class="k">display</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span>
<span class="p">}</span>


<span class="c">/* reset */</span>

<span class="nt">html</span><span class="o">,</span><span class="nt">body</span><span class="o">,</span><span class="nt">h1</span><span class="o">,</span><span class="nt">h2</span><span class="o">,</span><span class="nt">h3</span><span class="o">,</span><span class="nt">h4</span><span class="o">,</span><span class="nt">h5</span><span class="o">,</span><span class="nt">h6</span><span class="o">,</span><span class="nt">div</span><span class="o">,</span><span class="nt">dl</span><span class="o">,</span>
<span class="nt">dt</span><span class="o">,</span><span class="nt">dd</span><span class="o">,</span><span class="nt">ul</span><span class="o">,</span><span class="nt">ol</span><span class="o">,</span><span class="nt">li</span><span class="o">,</span><span class="nt">p</span><span class="o">,</span><span class="nt">blockquote</span><span class="o">,</span><span class="nt">pre</span><span class="o">,</span><span class="nt">hr</span><span class="o">,</span>
<span class="nt">figure</span><span class="o">,</span><span class="nt">table</span><span class="o">,</span><span class="nt">caption</span><span class="o">,</span><span class="nt">th</span><span class="o">,</span><span class="nt">td</span><span class="o">,</span><span class="nt">form</span><span class="o">,</span><span class="nt">fieldset</span><span class="o">,</span>
<span class="nt">legend</span><span class="o">,</span><span class="nt">input</span><span class="o">,</span><span class="nt">button</span><span class="o">,</span><span class="nt">textarea</span><span class="o">,</span><span class="nt">menu</span> <span class="p">{</span>
  <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
  <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
<span class="o">*,*</span><span class="p">::</span><span class="nd">before</span><span class="o">,*</span><span class="p">::</span><span class="nd">after</span><span class="p">{</span>
    <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span><span class="c">/* 修改默认盒模型 */</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">clearFix</span><span class="p">:</span><span class="nd">after</span> <span class="p">{</span>
    <span class="k">content</span><span class="p">:</span> <span class="s2">&#34;.&#34;</span><span class="p">;</span>
    <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span>
    <span class="k">height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">clear</span><span class="p">:</span> <span class="kc">both</span><span class="p">;</span>
    <span class="k">visibility</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
<span class="p">}</span>

</code></pre></td></tr></table>
</div>
</div><h3 id="phone-css重置">Phone-css重置</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span><span class="lnt">39
</span><span class="lnt">40
</span><span class="lnt">41
</span><span class="lnt">42
</span><span class="lnt">43
</span><span class="lnt">44
</span><span class="lnt">45
</span><span class="lnt">46
</span><span class="lnt">47
</span><span class="lnt">48
</span><span class="lnt">49
</span><span class="lnt">50
</span><span class="lnt">51
</span><span class="lnt">52
</span><span class="lnt">53
</span><span class="lnt">54
</span><span class="lnt">55
</span><span class="lnt">56
</span><span class="lnt">57
</span><span class="lnt">58
</span><span class="lnt">59
</span><span class="lnt">60
</span><span class="lnt">61
</span><span class="lnt">62
</span><span class="lnt">63
</span><span class="lnt">64
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css">
<span class="nt">html</span> <span class="p">{</span> <span class="k">font-family</span><span class="p">:</span> <span class="s2">&#34;Helvetica Neue&#34;</span><span class="p">,</span> <span class="n">Helvetica</span><span class="p">,</span> <span class="n">STHeiTi</span><span class="p">,</span> <span class="n">Arial</span><span class="p">,</span> <span class="kc">sans-serif</span><span class="p">;</span> <span class="kp">-ms-</span><span class="n">text-size-adjust</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span> <span class="kp">-webkit-</span><span class="n">text-size-adjust</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span> <span class="k">font-size</span><span class="p">:</span> <span class="mf">62.5</span><span class="kt">%</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">body</span> <span class="p">{</span> <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#333333</span><span class="p">;</span> <span class="k">background-color</span><span class="p">:</span> <span class="kc">white</span><span class="p">;</span> <span class="k">height</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span> <span class="k">overflow-x</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span> <span class="kp">-webkit-</span><span class="n">overflow-scrolling</span><span class="p">:</span> <span class="n">touch</span><span class="p">;</span> <span class="p">}</span>

<span class="nt">article</span><span class="o">,</span> <span class="nt">aside</span><span class="o">,</span> <span class="nt">details</span><span class="o">,</span> <span class="nt">figcaption</span><span class="o">,</span> <span class="nt">figure</span><span class="o">,</span> <span class="nt">footer</span><span class="o">,</span> <span class="nt">header</span><span class="o">,</span> <span class="nt">hgroup</span><span class="o">,</span> <span class="nt">main</span><span class="o">,</span> <span class="nt">nav</span><span class="o">,</span> <span class="nt">section</span><span class="o">,</span> <span class="nt">summary</span> <span class="p">{</span> <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">audio</span><span class="o">,</span> <span class="nt">canvas</span><span class="o">,</span> <span class="nt">progress</span><span class="o">,</span> <span class="nt">video</span> <span class="p">{</span> <span class="k">display</span><span class="p">:</span> <span class="kc">inline-block</span><span class="p">;</span> <span class="k">vertical-align</span><span class="p">:</span> <span class="kc">baseline</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">audio</span><span class="p">:</span><span class="nd">not</span><span class="o">([</span><span class="nt">controls</span><span class="o">])</span> <span class="p">{</span> <span class="k">display</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span> <span class="k">height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="o">[</span><span class="nt">hidden</span><span class="o">],</span> <span class="nt">template</span> <span class="p">{</span> <span class="k">display</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">svg</span><span class="p">:</span><span class="nd">not</span><span class="o">(</span><span class="p">:</span><span class="nd">root</span><span class="o">)</span> <span class="p">{</span> <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span> <span class="p">}</span>

<span class="nt">a</span> <span class="p">{</span> <span class="k">background</span><span class="p">:</span> <span class="kc">transparent</span><span class="p">;</span> <span class="k">text-decoration</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span> <span class="kp">-webkit-</span><span class="n">tap-highlight-color</span><span class="p">:</span> <span class="kc">transparent</span><span class="p">;</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#0088cc</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">a</span><span class="p">:</span><span class="nd">active</span> <span class="p">{</span> <span class="k">outline</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">a</span><span class="p">:</span><span class="nd">active</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#006699</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">abbr</span><span class="o">[</span><span class="nt">title</span><span class="o">]</span> <span class="p">{</span> <span class="k">border-bottom</span><span class="p">:</span> <span class="mi">1</span><span class="kt">px</span> <span class="kc">dotted</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">b</span><span class="o">,</span> <span class="nt">strong</span> <span class="p">{</span> <span class="k">font-weight</span><span class="p">:</span> <span class="kc">bold</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">dfn</span> <span class="p">{</span> <span class="k">font-style</span><span class="p">:</span> <span class="kc">italic</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">mark</span> <span class="p">{</span> <span class="k">background</span><span class="p">:</span> <span class="mh">#ff0</span><span class="p">;</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#000</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">small</span> <span class="p">{</span> <span class="k">font-size</span><span class="p">:</span> <span class="mi">80</span><span class="kt">%</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">sub</span><span class="o">,</span> <span class="nt">sup</span> <span class="p">{</span> <span class="k">font-size</span><span class="p">:</span> <span class="mi">75</span><span class="kt">%</span><span class="p">;</span> <span class="k">line-height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="k">position</span><span class="p">:</span> <span class="kc">relative</span><span class="p">;</span> <span class="k">vertical-align</span><span class="p">:</span> <span class="kc">baseline</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">sup</span> <span class="p">{</span> <span class="k">top</span><span class="p">:</span> <span class="mf">-0.5</span><span class="kt">em</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">sub</span> <span class="p">{</span> <span class="k">bottom</span><span class="p">:</span> <span class="mf">-0.25</span><span class="kt">em</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">img</span> <span class="p">{</span> <span class="k">border</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="k">vertical-align</span><span class="p">:</span> <span class="kc">middle</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">hr</span> <span class="p">{</span> <span class="kp">-moz-</span><span class="k">box-sizing</span><span class="p">:</span> <span class="kc">content-box</span><span class="p">;</span> <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">content-box</span><span class="p">;</span> <span class="k">height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">pre</span> <span class="p">{</span> <span class="k">overflow</span><span class="p">:</span> <span class="kc">auto</span><span class="p">;</span> <span class="k">white-space</span><span class="p">:</span> <span class="kc">pre</span><span class="p">;</span> <span class="k">white-space</span><span class="p">:</span> <span class="kc">pre-wrap</span><span class="p">;</span> <span class="k">word-wrap</span><span class="p">:</span> <span class="kc">break-word</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">code</span><span class="o">,</span> <span class="nt">kbd</span><span class="o">,</span> <span class="nt">pre</span><span class="o">,</span> <span class="nt">samp</span> <span class="p">{</span> <span class="k">font-family</span><span class="p">:</span> <span class="kc">monospace</span><span class="p">,</span> <span class="kc">monospace</span><span class="p">;</span> <span class="k">font-size</span><span class="p">:</span> <span class="mi">1</span><span class="kt">em</span><span class="p">;</span> <span class="p">}</span>

<span class="nt">button</span><span class="o">,</span> <span class="nt">input</span><span class="o">,</span> <span class="nt">optgroup</span><span class="o">,</span> <span class="nt">select</span><span class="o">,</span> <span class="nt">textarea</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span> <span class="kc">inherit</span><span class="p">;</span> <span class="k">font</span><span class="p">:</span> <span class="kc">inherit</span><span class="p">;</span> <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">button</span> <span class="p">{</span> <span class="k">overflow</span><span class="p">:</span> <span class="kc">visible</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">button</span><span class="o">,</span> <span class="nt">select</span> <span class="p">{</span> <span class="k">text-transform</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">button</span><span class="o">,</span> <span class="nt">html</span> <span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;button&#34;</span><span class="o">],</span> <span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;reset&#34;</span><span class="o">],</span> <span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;submit&#34;</span><span class="o">]</span> <span class="p">{</span> <span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span> <span class="n">button</span><span class="p">;</span> <span class="k">cursor</span><span class="p">:</span> <span class="kc">pointer</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">button</span><span class="o">[</span><span class="nt">disabled</span><span class="o">],</span> <span class="nt">html</span> <span class="nt">input</span><span class="o">[</span><span class="nt">disabled</span><span class="o">]</span> <span class="p">{</span> <span class="k">cursor</span><span class="p">:</span> <span class="kc">default</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">button</span><span class="p">::</span><span class="nd">-moz-focus-inner</span><span class="o">,</span> <span class="nt">input</span><span class="p">::</span><span class="nd">-moz-focus-inner</span> <span class="p">{</span> <span class="k">border</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">input</span> <span class="p">{</span> <span class="k">line-height</span><span class="p">:</span> <span class="kc">normal</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;checkbox&#34;</span><span class="o">],</span> <span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;radio&#34;</span><span class="o">]</span> <span class="p">{</span> <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span> <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;number&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-webkit-inner-spin-button</span><span class="o">,</span> <span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;number&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-webkit-outer-spin-button</span> <span class="p">{</span> <span class="k">height</span><span class="p">:</span> <span class="kc">auto</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;search&#34;</span><span class="o">]</span> <span class="p">{</span> <span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span> <span class="n">textfield</span><span class="p">;</span> <span class="kp">-moz-</span><span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span> <span class="kp">-webkit-</span><span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span> <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;search&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-webkit-search-cancel-button</span><span class="o">,</span> <span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&#34;search&#34;</span><span class="o">]</span><span class="p">::</span><span class="nd">-webkit-search-decoration</span> <span class="p">{</span> <span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">fieldset</span> <span class="p">{</span> <span class="k">border</span><span class="p">:</span> <span class="mi">1</span><span class="kt">px</span> <span class="kc">solid</span> <span class="mh">#c0c0c0</span><span class="p">;</span> <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span> <span class="mi">2</span><span class="kt">px</span><span class="p">;</span> <span class="k">padding</span><span class="p">:</span> <span class="mf">0.35</span><span class="kt">em</span> <span class="mf">0.625</span><span class="kt">em</span> <span class="mf">0.75</span><span class="kt">em</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">legend</span> <span class="p">{</span> <span class="k">border</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">textarea</span> <span class="p">{</span> <span class="k">overflow</span><span class="p">:</span> <span class="kc">auto</span><span class="p">;</span> <span class="k">resize</span><span class="p">:</span> <span class="kc">vertical</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">optgroup</span> <span class="p">{</span> <span class="k">font-weight</span><span class="p">:</span> <span class="kc">bold</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">table</span> <span class="p">{</span> <span class="k">border-collapse</span><span class="p">:</span> <span class="kc">collapse</span><span class="p">;</span> <span class="k">border-spacing</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">td</span><span class="o">,</span> <span class="nt">th</span> <span class="p">{</span> <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">html</span><span class="o">,</span> <span class="nt">button</span><span class="o">,</span> <span class="nt">input</span><span class="o">,</span> <span class="nt">select</span><span class="o">,</span> <span class="nt">textarea</span> <span class="p">{</span> <span class="k">font-family</span><span class="p">:</span> <span class="s2">&#34;Helvetica Neue&#34;</span><span class="p">,</span> <span class="n">Helvetica</span><span class="p">,</span> <span class="n">STHeiTi</span><span class="p">,</span> <span class="n">Arial</span><span class="p">,</span> <span class="kc">sans-serif</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">h1</span><span class="o">,</span> <span class="nt">h2</span><span class="o">,</span> <span class="nt">h3</span><span class="o">,</span> <span class="nt">h4</span><span class="o">,</span> <span class="nt">h5</span><span class="o">,</span> <span class="nt">h6</span><span class="o">,</span> <span class="nt">p</span><span class="o">,</span> <span class="nt">figure</span><span class="o">,</span> <span class="nt">form</span><span class="o">,</span> <span class="nt">blockquote</span> <span class="p">{</span> <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">ul</span><span class="o">,</span> <span class="nt">ol</span><span class="o">,</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">dl</span><span class="o">,</span> <span class="nt">dd</span> <span class="p">{</span> <span class="k">margin</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="k">padding</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">ul</span><span class="o">,</span> <span class="nt">ol</span> <span class="p">{</span> <span class="k">list-style</span><span class="p">:</span> <span class="kc">none</span> <span class="kc">outside</span> <span class="kc">none</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">h1</span><span class="o">,</span> <span class="nt">h2</span><span class="o">,</span> <span class="nt">h3</span> <span class="p">{</span> <span class="k">line-height</span><span class="p">:</span> <span class="mi">2</span><span class="p">;</span> <span class="k">font-weight</span><span class="p">:</span> <span class="kc">normal</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">input</span><span class="p">::</span><span class="nd">-moz-placeholder</span><span class="o">,</span> <span class="nt">textarea</span><span class="p">::</span><span class="nd">-moz-placeholder</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#cccccc</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">input</span><span class="p">:</span><span class="nd">-ms-input-placeholder</span><span class="o">,</span> <span class="nt">textarea</span><span class="p">:</span><span class="nd">-ms-input-placeholder</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#cccccc</span><span class="p">;</span> <span class="p">}</span>
<span class="nt">input</span><span class="p">::</span><span class="nd">-webkit-input-placeholder</span><span class="o">,</span> <span class="nt">textarea</span><span class="p">::</span><span class="nd">-webkit-input-placeholder</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span> <span class="mh">#cccccc</span><span class="p">;</span> <span class="p">}</span>

<span class="nt">body</span> <span class="p">{</span><span class="k">max-width</span><span class="p">:</span><span class="mi">750</span><span class="kt">px</span><span class="p">;</span><span class="k">margin</span><span class="p">:</span><span class="mi">0</span> <span class="kc">auto</span><span class="p">;}</span>
<span class="o">*,*</span><span class="p">::</span><span class="nd">before</span><span class="o">,*</span><span class="p">::</span><span class="nd">after</span><span class="p">{</span>
    <span class="k">box-sizing</span><span class="p">:</span> <span class="kc">border-box</span><span class="p">;</span><span class="c">/* 修改默认盒模型 */</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">clearFix</span><span class="p">:</span><span class="nd">after</span> <span class="p">{</span>
    <span class="k">content</span><span class="p">:</span> <span class="s2">&#34;.&#34;</span><span class="p">;</span>
    <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span>
    <span class="k">height</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">clear</span><span class="p">:</span> <span class="kc">both</span><span class="p">;</span>
    <span class="k">visibility</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
<span class="p">}</span>

</code></pre></td></tr></table>
</div>
</div><h2 id="公共样式">公共样式</h2>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">  1
</span><span class="lnt">  2
</span><span class="lnt">  3
</span><span class="lnt">  4
</span><span class="lnt">  5
</span><span class="lnt">  6
</span><span class="lnt">  7
</span><span class="lnt">  8
</span><span class="lnt">  9
</span><span class="lnt"> 10
</span><span class="lnt"> 11
</span><span class="lnt"> 12
</span><span class="lnt"> 13
</span><span class="lnt"> 14
</span><span class="lnt"> 15
</span><span class="lnt"> 16
</span><span class="lnt"> 17
</span><span class="lnt"> 18
</span><span class="lnt"> 19
</span><span class="lnt"> 20
</span><span class="lnt"> 21
</span><span class="lnt"> 22
</span><span class="lnt"> 23
</span><span class="lnt"> 24
</span><span class="lnt"> 25
</span><span class="lnt"> 26
</span><span class="lnt"> 27
</span><span class="lnt"> 28
</span><span class="lnt"> 29
</span><span class="lnt"> 30
</span><span class="lnt"> 31
</span><span class="lnt"> 32
</span><span class="lnt"> 33
</span><span class="lnt"> 34
</span><span class="lnt"> 35
</span><span class="lnt"> 36
</span><span class="lnt"> 37
</span><span class="lnt"> 38
</span><span class="lnt"> 39
</span><span class="lnt"> 40
</span><span class="lnt"> 41
</span><span class="lnt"> 42
</span><span class="lnt"> 43
</span><span class="lnt"> 44
</span><span class="lnt"> 45
</span><span class="lnt"> 46
</span><span class="lnt"> 47
</span><span class="lnt"> 48
</span><span class="lnt"> 49
</span><span class="lnt"> 50
</span><span class="lnt"> 51
</span><span class="lnt"> 52
</span><span class="lnt"> 53
</span><span class="lnt"> 54
</span><span class="lnt"> 55
</span><span class="lnt"> 56
</span><span class="lnt"> 57
</span><span class="lnt"> 58
</span><span class="lnt"> 59
</span><span class="lnt"> 60
</span><span class="lnt"> 61
</span><span class="lnt"> 62
</span><span class="lnt"> 63
</span><span class="lnt"> 64
</span><span class="lnt"> 65
</span><span class="lnt"> 66
</span><span class="lnt"> 67
</span><span class="lnt"> 68
</span><span class="lnt"> 69
</span><span class="lnt"> 70
</span><span class="lnt"> 71
</span><span class="lnt"> 72
</span><span class="lnt"> 73
</span><span class="lnt"> 74
</span><span class="lnt"> 75
</span><span class="lnt"> 76
</span><span class="lnt"> 77
</span><span class="lnt"> 78
</span><span class="lnt"> 79
</span><span class="lnt"> 80
</span><span class="lnt"> 81
</span><span class="lnt"> 82
</span><span class="lnt"> 83
</span><span class="lnt"> 84
</span><span class="lnt"> 85
</span><span class="lnt"> 86
</span><span class="lnt"> 87
</span><span class="lnt"> 88
</span><span class="lnt"> 89
</span><span class="lnt"> 90
</span><span class="lnt"> 91
</span><span class="lnt"> 92
</span><span class="lnt"> 93
</span><span class="lnt"> 94
</span><span class="lnt"> 95
</span><span class="lnt"> 96
</span><span class="lnt"> 97
</span><span class="lnt"> 98
</span><span class="lnt"> 99
</span><span class="lnt">100
</span><span class="lnt">101
</span><span class="lnt">102
</span><span class="lnt">103
</span><span class="lnt">104
</span><span class="lnt">105
</span><span class="lnt">106
</span><span class="lnt">107
</span><span class="lnt">108
</span><span class="lnt">109
</span><span class="lnt">110
</span><span class="lnt">111
</span><span class="lnt">112
</span><span class="lnt">113
</span><span class="lnt">114
</span><span class="lnt">115
</span><span class="lnt">116
</span><span class="lnt">117
</span><span class="lnt">118
</span><span class="lnt">119
</span><span class="lnt">120
</span><span class="lnt">121
</span><span class="lnt">122
</span><span class="lnt">123
</span><span class="lnt">124
</span><span class="lnt">125
</span><span class="lnt">126
</span><span class="lnt">127
</span><span class="lnt">128
</span><span class="lnt">129
</span><span class="lnt">130
</span><span class="lnt">131
</span><span class="lnt">132
</span><span class="lnt">133
</span><span class="lnt">134
</span><span class="lnt">135
</span><span class="lnt">136
</span><span class="lnt">137
</span><span class="lnt">138
</span><span class="lnt">139
</span><span class="lnt">140
</span><span class="lnt">141
</span><span class="lnt">142
</span><span class="lnt">143
</span><span class="lnt">144
</span><span class="lnt">145
</span><span class="lnt">146
</span><span class="lnt">147
</span><span class="lnt">148
</span><span class="lnt">149
</span><span class="lnt">150
</span><span class="lnt">151
</span><span class="lnt">152
</span><span class="lnt">153
</span><span class="lnt">154
</span><span class="lnt">155
</span><span class="lnt">156
</span><span class="lnt">157
</span><span class="lnt">158
</span><span class="lnt">159
</span><span class="lnt">160
</span><span class="lnt">161
</span><span class="lnt">162
</span><span class="lnt">163
</span><span class="lnt">164
</span><span class="lnt">165
</span><span class="lnt">166
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-css" data-lang="css"><span class="c">/* 禁止选中文本 */</span>
<span class="p">.</span><span class="nc">usn</span><span class="p">{</span>
    <span class="kp">-webkit-</span><span class="k">user-select</span><span class="p">:</span><span class="kc">none</span><span class="p">;</span>
    <span class="kp">-moz-</span><span class="k">user-select</span><span class="p">:</span><span class="kc">none</span><span class="p">;</span>
    <span class="kp">-ms-</span><span class="k">user-select</span><span class="p">:</span><span class="kc">none</span><span class="p">;</span>
    <span class="kp">-o-</span><span class="k">user-select</span><span class="p">:</span><span class="kc">none</span><span class="p">;</span>
    <span class="k">user-select</span><span class="p">:</span><span class="kc">none</span><span class="p">;</span>
<span class="p">}</span>
<span class="c">/* 浮动 */</span>
<span class="p">.</span><span class="nc">fl</span> <span class="p">{</span> <span class="k">float</span><span class="p">:</span> <span class="kc">left</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">fr</span> <span class="p">{</span> <span class="k">float</span><span class="p">:</span> <span class="kc">right</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">cf</span> <span class="p">{</span> <span class="n">zoom</span><span class="p">:</span> <span class="mi">1</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">cf</span><span class="p">:</span><span class="nd">after</span> <span class="p">{</span>
    <span class="k">content</span><span class="p">:</span><span class="s2">&#34;.&#34;</span><span class="p">;</span>
    <span class="k">display</span><span class="p">:</span><span class="kc">block</span><span class="p">;</span>
    <span class="k">clear</span><span class="p">:</span><span class="kc">both</span><span class="p">;</span>
    <span class="k">visibility</span><span class="p">:</span><span class="kc">hidden</span><span class="p">;</span>
    <span class="k">height</span><span class="p">:</span><span class="mi">0</span><span class="p">;</span>
    <span class="k">overflow</span><span class="p">:</span><span class="kc">hidden</span><span class="p">;</span>
<span class="p">}</span>

<span class="c">/* 元素类型 */</span>
<span class="p">.</span><span class="nc">db</span> <span class="p">{</span> <span class="k">display</span><span class="p">:</span> <span class="kc">block</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">dn</span> <span class="p">{</span> <span class="k">display</span><span class="p">:</span> <span class="kc">none</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">di</span> <span class="p">{</span> <span class="k">display</span><span class="p">:</span> <span class="kc">inline</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">dib</span> <span class="p">{</span><span class="k">display</span><span class="p">:</span> <span class="kc">inline-block</span><span class="p">;}</span>
<span class="p">.</span><span class="nc">transparent</span> <span class="p">{</span> <span class="k">opacity</span><span class="p">:</span> <span class="mi">0</span> <span class="p">}</span>


<span class="c">/*文字排版、颜色*/</span>
<span class="p">.</span><span class="nc">f12</span> <span class="p">{</span> <span class="k">font-size</span><span class="p">:</span><span class="mi">12</span><span class="kt">px</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">f14</span> <span class="p">{</span> <span class="k">font-size</span><span class="p">:</span><span class="mi">14</span><span class="kt">px</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">f16</span> <span class="p">{</span> <span class="k">font-size</span><span class="p">:</span><span class="mi">16</span><span class="kt">px</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">f18</span> <span class="p">{</span> <span class="k">font-size</span><span class="p">:</span><span class="mi">18</span><span class="kt">px</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">f20</span> <span class="p">{</span> <span class="k">font-size</span><span class="p">:</span><span class="mi">20</span><span class="kt">px</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">fb</span> <span class="p">{</span> <span class="k">font-weight</span><span class="p">:</span><span class="kc">bold</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">fn</span> <span class="p">{</span> <span class="k">font-weight</span><span class="p">:</span><span class="kc">normal</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">t2</span> <span class="p">{</span> <span class="k">text-indent</span><span class="p">:</span><span class="mi">2</span><span class="kt">em</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">red</span><span class="o">,</span><span class="nt">a</span><span class="p">.</span><span class="nc">red</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span><span class="mh">#cc0031</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">darkblue</span><span class="o">,</span><span class="nt">a</span><span class="p">.</span><span class="nc">darkblue</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span><span class="mh">#039</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">gray</span><span class="o">,</span><span class="nt">a</span><span class="p">.</span><span class="nc">gray</span> <span class="p">{</span> <span class="k">color</span><span class="p">:</span><span class="mh">#878787</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">lh150</span> <span class="p">{</span> <span class="k">line-height</span><span class="p">:</span><span class="mi">150</span><span class="kt">%</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">lh180</span> <span class="p">{</span> <span class="k">line-height</span><span class="p">:</span><span class="mi">180</span><span class="kt">%</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">lh200</span> <span class="p">{</span> <span class="k">line-height</span><span class="p">:</span><span class="mi">200</span><span class="kt">%</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">unl</span> <span class="p">{</span> <span class="k">text-decoration</span><span class="p">:</span><span class="kc">underline</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">no_unl</span> <span class="p">{</span> <span class="k">text-decoration</span><span class="p">:</span><span class="kc">none</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">tl</span> <span class="p">{</span> <span class="k">text-align</span><span class="p">:</span> <span class="kc">left</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">tc</span> <span class="p">{</span> <span class="k">text-align</span><span class="p">:</span> <span class="kc">center</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">tr</span> <span class="p">{</span> <span class="k">text-align</span><span class="p">:</span> <span class="kc">right</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">tj</span> <span class="p">{</span> <span class="k">text-align</span><span class="p">:</span> <span class="kc">justify</span><span class="p">;</span> <span class="k">text-justify</span><span class="p">:</span> <span class="n">inter-ideograph</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">wn</span> <span class="p">{</span> <span class="c">/* 强制不换行 */</span>
    <span class="k">word-wrap</span><span class="p">:</span><span class="kc">normal</span><span class="p">;</span>
    <span class="k">white-space</span><span class="p">:</span><span class="kc">nowrap</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">wb</span> <span class="p">{</span> <span class="c">/* 强制换行 */</span>
    <span class="k">white-space</span><span class="p">:</span><span class="kc">normal</span><span class="p">;</span>
    <span class="k">word-wrap</span><span class="p">:</span><span class="kc">break-word</span><span class="p">;</span>
    <span class="k">word-break</span><span class="p">:</span><span class="n">break-all</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">wp</span> <span class="p">{</span> <span class="c">/* 保持空白序列*/</span>
    <span class="k">overflow</span><span class="p">:</span><span class="kc">hidden</span><span class="p">;</span><span class="k">text-align</span><span class="p">:</span><span class="kc">left</span><span class="p">;</span><span class="k">white-space</span><span class="p">:</span><span class="kc">pre-wrap</span><span class="p">;</span><span class="k">word-wrap</span><span class="p">:</span><span class="kc">break-word</span><span class="p">;</span><span class="k">word-break</span><span class="p">:</span><span class="n">break-all</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">wes</span> <span class="p">{</span> <span class="c">/* 多出部分用省略号表示 , 用于一行 */</span>
    <span class="k">overflow</span><span class="p">:</span><span class="kc">hidden</span><span class="p">;</span>
    <span class="k">word-wrap</span><span class="p">:</span><span class="kc">normal</span><span class="p">;</span>
    <span class="k">white-space</span><span class="p">:</span><span class="kc">nowrap</span><span class="p">;</span>
    <span class="k">text-overflow</span><span class="p">:</span><span class="kc">ellipsis</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">wes-2</span> <span class="p">{</span> <span class="c">/* 适用于webkit内核和移动端 */</span>
    <span class="k">display</span><span class="p">:</span> <span class="kp">-webkit-</span><span class="n">box</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="n">box-orient</span><span class="p">:</span> <span class="kc">vertical</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="n">line-clamp</span><span class="p">:</span> <span class="mi">2</span><span class="p">;</span>
    <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
<span class="p">}</span> 
<span class="p">.</span><span class="nc">wes-3</span> <span class="p">{</span>
    <span class="k">display</span><span class="p">:</span> <span class="kp">-webkit-</span><span class="n">box</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="n">box-orient</span><span class="p">:</span> <span class="kc">vertical</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="n">line-clamp</span><span class="p">:</span> <span class="mi">3</span><span class="p">;</span>
    <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">wes-4</span> <span class="p">{</span>
    <span class="k">display</span><span class="p">:</span> <span class="kp">-webkit-</span><span class="n">box</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="n">box-orient</span><span class="p">:</span> <span class="kc">vertical</span><span class="p">;</span>
    <span class="kp">-webkit-</span><span class="n">line-clamp</span><span class="p">:</span> <span class="mi">4</span><span class="p">;</span>
    <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span>
<span class="p">}</span>

<span class="c">/* 溢出样式 */</span>
<span class="p">.</span><span class="nc">ofh</span> <span class="p">{</span> <span class="k">overflow</span><span class="p">:</span> <span class="kc">hidden</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">ofs</span> <span class="p">{</span><span class="k">overflow</span><span class="p">:</span> <span class="kc">scroll</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">ofa</span> <span class="p">{</span><span class="k">overflow</span><span class="p">:</span> <span class="kc">auto</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">ofv</span> <span class="p">{</span><span class="k">overflow</span><span class="p">:</span> <span class="kc">visible</span><span class="p">;</span> <span class="p">}</span>

<span class="c">/* 定位方式 */</span>
<span class="p">.</span><span class="nc">ps</span> <span class="p">{</span><span class="k">position</span><span class="p">:</span> <span class="kc">static</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">pr</span> <span class="p">{</span><span class="k">position</span><span class="p">:</span> <span class="kc">relative</span><span class="p">;</span><span class="n">zoom</span><span class="p">:</span><span class="mi">1</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">pa</span> <span class="p">{</span><span class="k">position</span><span class="p">:</span> <span class="kc">absolute</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">pf</span> <span class="p">{</span><span class="k">position</span><span class="p">:</span> <span class="kc">fixed</span><span class="p">;</span> <span class="p">}</span>


<span class="c">/* 垂直对齐方式 */</span>
<span class="p">.</span><span class="nc">vt</span> <span class="p">{</span><span class="k">vertical-align</span><span class="p">:</span> <span class="kc">top</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">vm</span> <span class="p">{</span><span class="k">vertical-align</span><span class="p">:</span> <span class="kc">middle</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">vb</span> <span class="p">{</span><span class="k">vertical-align</span><span class="p">:</span> <span class="kc">bottom</span><span class="p">;</span> <span class="p">}</span>


<span class="c">/* 鼠标样式 */</span>
<span class="p">.</span><span class="nc">csd</span> <span class="p">{</span><span class="k">cursor</span><span class="p">:</span> <span class="kc">default</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">csp</span> <span class="p">{</span><span class="k">cursor</span><span class="p">:</span> <span class="kc">pointer</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">csh</span> <span class="p">{</span><span class="k">cursor</span><span class="p">:</span> <span class="kc">help</span><span class="p">;</span> <span class="p">}</span>
<span class="p">.</span><span class="nc">csm</span> <span class="p">{</span><span class="k">cursor</span><span class="p">:</span> <span class="kc">move</span><span class="p">;</span> <span class="p">}</span>

<span class="c">/* flex布局 */</span>
<span class="p">.</span><span class="nc">df-sb</span> <span class="p">{</span>
    <span class="k">display</span><span class="p">:</span><span class="kc">flex</span><span class="p">;</span>
    <span class="k">align-items</span><span class="p">:</span> <span class="kc">center</span><span class="p">;</span>
    <span class="k">justify-content</span><span class="p">:</span> <span class="kc">space-between</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">df-sa</span> <span class="p">{</span>
    <span class="k">display</span><span class="p">:</span><span class="kc">flex</span><span class="p">;</span>
    <span class="k">align-items</span><span class="p">:</span> <span class="kc">center</span><span class="p">;</span>
    <span class="k">justify-content</span><span class="p">:</span> <span class="kc">space-around</span><span class="p">;</span>
<span class="p">}</span>

<span class="c">/* 垂直居中 */</span>
<span class="p">.</span><span class="nc">df-c</span> <span class="p">{</span>
    <span class="k">display</span><span class="p">:</span> <span class="kc">flex</span><span class="p">;</span>
    <span class="k">align-items</span><span class="p">:</span> <span class="kc">center</span><span class="p">;</span>
    <span class="k">justify-content</span><span class="p">:</span> <span class="kc">center</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">tb-c</span> <span class="p">{</span>
    <span class="k">text-align</span><span class="p">:</span><span class="kc">center</span><span class="p">;</span>
    <span class="k">display</span><span class="p">:</span><span class="kc">table-cell</span><span class="p">;</span>
    <span class="k">vertical-align</span><span class="p">:</span><span class="kc">middle</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">ts-c</span> <span class="p">{</span>
    <span class="k">position</span><span class="p">:</span> <span class="kc">absolute</span><span class="p">;</span>
    <span class="k">left</span><span class="p">:</span> <span class="mi">50</span><span class="kt">%</span><span class="p">;</span> <span class="k">top</span><span class="p">:</span> <span class="mi">50</span><span class="kt">%</span><span class="p">;</span>
    <span class="k">transform</span><span class="p">:</span> <span class="nb">translate</span><span class="p">(</span><span class="mi">-50</span><span class="kt">%</span><span class="p">,</span> <span class="mi">-50</span><span class="kt">%</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">ts-mc</span> <span class="p">{</span>
    <span class="k">position</span><span class="p">:</span> <span class="kc">absolute</span><span class="p">;</span>
    <span class="k">left</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span><span class="k">right</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">bottom</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span> <span class="k">top</span><span class="p">:</span> <span class="mi">0</span><span class="p">;</span>
    <span class="k">margin</span><span class="p">:</span> <span class="kc">auto</span><span class="p">;</span>
<span class="p">}</span>

<span class="c">/* 辅助 */</span>
<span class="p">.</span><span class="nc">mask-fixed-wrapper</span> <span class="p">{</span>
    <span class="k">width</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
    <span class="k">height</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
    <span class="k">position</span><span class="p">:</span> <span class="kc">fixed</span><span class="p">;</span>
    <span class="k">left</span><span class="p">:</span><span class="mi">0</span><span class="p">;</span><span class="k">top</span><span class="p">:</span><span class="mi">0</span><span class="p">;</span>
    <span class="k">background</span><span class="p">:</span> <span class="nb">rgba</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mf">0.65</span><span class="p">);</span>
    <span class="k">z-index</span><span class="p">:</span> <span class="mi">999</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">bg-cover</span> <span class="p">{</span>
    <span class="k">background-size</span><span class="p">:</span> <span class="kc">cover</span><span class="p">;</span>
    <span class="k">background-repeat</span><span class="p">:</span> <span class="kc">no-repeat</span><span class="p">;</span>
    <span class="k">background-position</span><span class="p">:</span> <span class="kc">center</span> <span class="kc">center</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">.</span><span class="nc">bg-cover-all</span> <span class="p">{</span>
    <span class="k">background-size</span><span class="p">:</span> <span class="mi">100</span><span class="kt">%</span> <span class="mi">100</span><span class="kt">%</span><span class="p">;</span>
    <span class="k">background-repeat</span><span class="p">:</span> <span class="kc">no-repeat</span><span class="p">;</span>
    <span class="k">background-position</span><span class="p">:</span> <span class="kc">center</span> <span class="kc">center</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div>
    </div>

    <div class="post-copyright">
  <p class="copyright-item">
    <span class="item-title">文章作者</span>
    <span class="item-content">even</span>
  </p>
  <p class="copyright-item">
    <span class="item-title">上次更新</span>
    <span class="item-content">
        2018-02-05
        
    </span>
  </p>
  
  
</div>
<footer class="post-footer">
      <div class="post-tags">
          <a href="/tags/css/">CSS</a>
          </div>
      <nav class="post-nav">
        <a class="prev" href="/post/1/vscode%E6%8F%92%E4%BB%B6/">
            <i class="iconfont icon-left"></i>
            <span class="prev-text nav-default">vscode插件</span>
            <span class="prev-text nav-mobile">上一篇</span>
          </a>
        <a class="next" href="/post/htmlcss/%E5%B1%82%E5%8F%A0%E9%A1%BA%E5%BA%8F%E4%B8%8E%E5%A0%86%E6%A0%88%E4%B8%8A%E4%B8%8B%E6%96%87/">
            <span class="next-text nav-default">层叠顺序与堆栈上下文</span>
            <span class="next-text nav-mobile">下一篇</span>
            <i class="iconfont icon-right"></i>
          </a>
      </nav>
    </footer>
  </article>
        </div>
        

  

  

      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="social-links">
      <a href="mailto:your@email.com" class="iconfont icon-email" title="email"></a>
      <a href="http://localhost:1313" class="iconfont icon-stack-overflow" title="stack-overflow"></a>
      <a href="http://localhost:1313" class="iconfont icon-twitter" title="twitter"></a>
      <a href="http://localhost:1313" class="iconfont icon-facebook" title="facebook"></a>
      <a href="http://localhost:1313" class="iconfont icon-linkedin" title="linkedin"></a>
      <a href="http://localhost:1313" class="iconfont icon-google" title="google"></a>
      <a href="http://localhost:1313" class="iconfont icon-github" title="github"></a>
      <a href="http://localhost:1313" class="iconfont icon-weibo" title="weibo"></a>
      <a href="http://localhost:1313" class="iconfont icon-zhihu" title="zhihu"></a>
      <a href="http://localhost:1313" class="iconfont icon-douban" title="douban"></a>
      <a href="http://localhost:1313" class="iconfont icon-pocket" title="pocket"></a>
      <a href="http://localhost:1313" class="iconfont icon-tumblr" title="tumblr"></a>
      <a href="http://localhost:1313" class="iconfont icon-instagram" title="instagram"></a>
      <a href="http://localhost:1313" class="iconfont icon-gitlab" title="gitlab"></a>
      <a href="http://localhost:1313" class="iconfont icon-bilibili" title="bilibili"></a>
  <a href="https://zhouxiaoxin.gitee.io/index.xml" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
</div>

<div class="copyright">
  <span class="power-by">
    由 <a class="hexo-link" href="https://gohugo.io">Hugo</a> 强力驱动
  </span>
  <span class="division">|</span>
  <span class="theme-info">
    主题 - 
    <a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
  </span>

  <div class="busuanzi-footer">
    <span id="busuanzi_container_site_pv"> 本站总访问量 <span id="busuanzi_value_site_pv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 次 </span>
      <span class="division">|</span>
    <span id="busuanzi_container_site_uv"> 本站总访客数 <span id="busuanzi_value_site_uv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 人 </span>
  </div>

  <span class="copyright-year">
    &copy; 
    2018 - 
    2022
    <span class="heart">
      <i class="iconfont icon-heart"></i>
    </span>
    <span class="author">even</span>
  </span>
</div>
    </footer>

    <div class="back-to-top" id="back-to-top">
      <i class="iconfont icon-up"></i>
    </div>
  </div>
  
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>



<script type="text/javascript" src="/js/main.min.2517c0eb67172a0bae917de4af59b10ca2531411a009d4c0b82f5685259e5771.js"></script>








</body>
</html>
